#!/usr/bin/python
# encoding=utf-8

import sys
if sys.version_info[0] == 2:
    # Python2
    import core.AepSdkRequestSend as AepSdkRequestSend
else:
    # Python3
    from lib.apis.core import AepSdkRequestSend



#参数productId: 类型long, 参数可以为空
#  描述:可通过产品ID搜索
#参数pageNow: 类型long, 参数可以为空
#  描述:当前页
#参数pageSize: 类型long, 参数可以为空
#  描述:每页记录数
def QueryActionList(appKey, appSecret, productId = "", pageNow = "", pageSize = ""):
    path = '/aep_scene_action/getActionList'
    head = {}
    param = {'productId':productId, 'pageNow':pageNow, 'pageSize':pageSize}
    version = '20240126035641'
    application = appKey
    key = appSecret
    response = AepSdkRequestSend.sendSDKRequest(path, head, param, None, version, application, key, 'GET')
    if response is not None:
        return response.read()
    return None

#参数pageNow: 类型long, 参数可以为空
#  描述:
#参数pageSize: 类型long, 参数可以为空
#  描述:
def QuerySceneList(appKey, appSecret, pageNow = "", pageSize = ""):
    path = '/aep_scene_action/getSceneList'
    head = {}
    param = {'pageNow':pageNow, 'pageSize':pageSize}
    version = '20240126035701'
    application = appKey
    key = appSecret
    response = AepSdkRequestSend.sendSDKRequest(path, head, param, None, version, application, key, 'GET')
    if response is not None:
        return response.read()
    return None

#参数body: 类型json, 参数不可以为空
#  描述:body,具体参考平台api说明
def ActionExecute(appKey, appSecret, body):
    path = '/aep_scene_action/action/execute'
    head = {}
    param = {}
    version = '20240126035654'
    application = appKey
    key = appSecret
    response = AepSdkRequestSend.sendSDKRequest(path, head, param, body, version, application, key, 'POST')
    if response is not None:
        return response.read()
    return None

#参数body: 类型json, 参数不可以为空
#  描述:body,具体参考平台api说明
def SceneExecute(appKey, appSecret, body):
    path = '/aep_scene_action/scene/execute'
    head = {}
    param = {}
    version = '20240126035634'
    application = appKey
    key = appSecret
    response = AepSdkRequestSend.sendSDKRequest(path, head, param, body, version, application, key, 'POST')
    if response is not None:
        return response.read()
    return None

